#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
using namespace std;


int main()
{
	long long m = 0;
	for (int i = 2; i < 125; i++)
	{
		long long a = 1024 * i;
		if (a % 2024 == 0)
		{
			m = a;
			break;
		}
	}
	cout << m;
	return 0;
}

